from django.db import models

# Create your models here.
class Login(models.Model):
    username = models.CharField(max_length=32)
    password = models.CharField(max_length=225)

    class Meta:
        db_table = 'login'

class GWC(models.Model):
    name = models.CharField(max_length=225)
    date = models.DateTimeField(auto_now_add=True)
    price = models.DecimalField(max_digits=9,decimal_places=2)
    img = models.ImageField(upload_to='uploads')
    JQ = models.CharField(max_length=32)
    XQ = models.CharField(max_length=225)
    GX = models.ForeignKey(Login,on_delete=models.CASCADE)
    class Meta:
        db_table = 'gwc'
